#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include "hash.h"

void TestHashTable1()
{
	HashTable<int, int> hash;
	int arr[] = { 1,4,5,6,7,44,13,23 };

	for (const auto& e : arr)
	{
		hash.insert(std::make_pair(e, e));
	}

	auto pos1 = hash.find(44);
	auto pos2 = hash.find(13);
	hash.erase(44);
	auto pos3 = hash.find(44);

	std::cout << pos1 << ":" << pos1->_kv.first << std::endl;
	std::cout << pos2 << ":" << pos2->_kv.first << std::endl;
	std::cout << pos3 << std::endl;
}

void TestHashTable2()
{
	HashTable<int, int> hash;
	int arr[] = { 1,11,21,31,41,8,9,12 };

	for (const auto& e : arr)
	{
		hash.insert(std::make_pair(e, e));
	}

	hash.Print();
}

int main()
{
	TestHashTable2();

	return 0;
}